package com.tang.single;

/**
 * @author tmh
 * @date 2024/4/15 21:45
 * @description
 */
public class SingleTon {
    private static volatile SingleTon instance = null;

    private SingleTon() {
    }

    public static SingleTon getInstance() {
        if (instance == null) {
            synchronized (SingleTon.class) {
                if (instance == null) {
                    instance = new SingleTon();
                }
            }
        }
        return instance;
    }
}
